#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np

a = 10*(np.random.rand(10,10)-0.5)

#方法1
m = a.max()
n = a.min()

#方法2
m1 = max(a.flatten())
n1 = min(a.flatten())

#方法3
m2 = a[0,0]
n2 = a[0,0]
for i in range(10):
    for j in range(10):
        if a[i,j]>m2:
            m2 = a[i,j]
        if a[i,j]<n2:
            n2 = a[i,j]
